package Test;

public class Test6_MianJiBiJiao {
    public static void main(String[] args) {
        //定义方法，比较两个长方形的面积

        //分析：
        //定义方法，求长方体面积
        //再通过调用返回方法值到主方法中
        //最后通过条件判断比较

        double area1 = mianJi(4.3,8.2);
        double area2 = mianJi(3.8,6.6);

        if (area1 > area2){
            System.out.println(area1 + " area1更大");
        }else {
            System.out.println(area2 + " area2更大");
        }
    }

    public static double mianJi(double a,double b) {
        double S = a * b;
        return S;
    }

}
